<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #div1{
            width: 200px;
            height: 200px;
            background: #f00;
            /* border: 1px solid transparent; */
            /* position: absolute; */
            overflow: hidden;
        }
        #div2{
            width: 100px;
            height: 50px;
            background: #0f0;
            margin-top: 50px;
            /* float: left; */
        }
    </style>
</head>
<body>
    <div id="div1">
        <div id="div2">
            
        </div>
        <h1>haha</h1>
    </div>
    <h1>hehe</h1>
</body>
</html>